import { Component, OnInit, Input } from '@angular/core'

@Component({
  selector: 'ad-form-value',
  template: `<div [title]="value" *ngIf="value != undefined && value !== ''; else content">
      {{ value }}
    </div>
    <ng-template #content>
      <div>
        <ng-content></ng-content>
      </div>
    </ng-template> `,
  host: {
    '[class.ad-content-ellipsis]': '!isWrap',
    '[class.ad-content-warp]': 'isWrap',
    '[class.ad-form-value]': 'true',
  },
})
export class AdFormValueComponent implements OnInit {
  @Input() value: string | number = ''
  @Input() isWrap: boolean = true
  constructor() {}
  ngOnInit() {}
}
